'use strict';
const dayjs = require("dayjs");
module.exports = app => {
    const { INTEGER, STRING  } = app.Sequelize;
    return app.model.define(
        'DeviceInfo',
        {
            device_id: {type: STRING, primaryKey: true, autoIncrement: false},
            farm_id: INTEGER,
            device_name: STRING,
            status: INTEGER,
        },
        {
            tableName: 'device_info',
            timestamps: true, // 启用时间戳(createdAt, updatedAt)
            updatedAt: false, // 不想要 updatedAt
            createdAt: false, // 想要  createdAt 但是希望名称叫做 create_time
        }
    );
};

